import request from "@/utils/request";

export function getAllSeeding(query){
  return request({
    url: 'seeding/getAllSeeding/' + query.page + '/' + query.limit,
    method: 'get'
  })
}

export function querySeedingById(id) {
  return request({
    url: 'seeding/querySeedingById/' + id,
    method: 'get'
  })
}

export function deleteSeeding(id) {
  return request({
    url: 'seeding/deleteSeeding/' + id,
    method: 'get'
  })
}

export function updateSeeding(seed,diseases) {
  return request({
    url: 'seeding/updateSeeding',
    method: 'post',
    data:{
      seed:seed,
      diseases:diseases
    },
  })
}

export function insertSeeding(seed,diseases) {
  return request({
    url: 'seeding/insertSeeding',
    method: 'post',
    data:{
      seed:seed,
      diseases:diseases
    },
  })
}

export function querySeedingByName(name) {
  return request({
    url: 'seeding/querySeedingByName/' + name,
    method: 'get'
  })
}

//获取花木数量
export function getSeedingCount() {
  return request({
    url: 'seeding/getSeedingCount',
    method: 'get'
  })
}

export function getNextSeeding(id) {
  return request({
    url: 'seeding/getNextSeeding/'+id,
    method: 'get'
  })
}

export function getPreSeeding(id) {
  return request({
    url: 'seeding/getPreSeeding/'+id,
    method: 'get'
  })
}
